<template>
  <div>
    <el-row>
      <el-col :span="3">
        <el-image style="width: 100%; height: 100%" :src="owner.avatar" fit="['fill', 'contain', 'cover', 'none', 'scale-down']"></el-image>
      </el-col>
      <el-col :span="21">
        <el-row style="padding-left: 10px;padding-right: 50px;padding-bottom: 40px">
          <el-col :span="6">
            <span class="zitiyangshi">业主ID:</span> <span class="neirong">{{owner.id}}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">业主名称:</span> <span class="neirong">{{ owner.name }}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">性别:</span> <span class="neirong">{{ owner.sex===1 ? '男':'女' }}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">年龄:</span> <span class="neirong">{{ owner.age }}</span> 岁
          </el-col>
        </el-row>
        <el-row style="padding-left: 10px;padding-right: 50px;">
          <el-col :span="6">
            <span class="zitiyangshi">手机号:</span> <span class="neirong">{{ owner.link | phone}}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">身份证号:</span> <span class="neirong">{{ owner.idCard |idCard }}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">备注:</span> <span class="neirong">{{ owner.remark }}</span>
          </el-col>
          <el-col :span="6">
            <span class="zitiyangshi">业主注册时间:</span> <span class="neirong">{{ owner.createTime}}</span>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import {getOwnerById} from '@/api/village/owner'
export default {
  name: "stepThree",
  props:['ownerId'],
  data(){
    return{
      owner:{}
    }
  },
  created() {
    this.getOwner()
  },
  methods:{
    getOwner(){
      getOwnerById(this.ownerId).then(res => {
        this.owner = res.data
      })
    }
  }
}
</script>

<style scoped>
.zitiyangshi{
  color : #686B6D; /*文字颜色*/
  font-weight:bold; /*文字粗体*/
  font-family : 宋体,sans-serif; /*文字字体*/
  font-size:20px;
  height:36px;
}
.neirong{
  margin: 0 5px;
  color : #999999; /*文字颜色*/
  font-weight:bold; /*文字粗体*/
  font-family : 宋体,sans-serif; /*文字字体*/
  font-size:15px;
  height:36px;
}
</style>
